{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pixiedust database opened successfully\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "        <div style=\"margin:10px\">\n",
       "            <a href=\"https://github.com/ibm-watson-data-lab/pixiedust\" target=\"_new\">\n",
       "                <img src=\"https://github.com/ibm-watson-data-lab/pixiedust/raw/master/docs/_static/pd_icon32.png\" style=\"float:left;margin-right:10px\"/>\n",
       "            </a>\n",
       "            <span>Pixiedust version 1.1.18</span>\n",
       "        </div>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>Warning: You are not running the latest version of PixieDust. Current is 1.1.18, Latest is 1.1.17</div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>Please copy and run the following command in a new cell to upgrade: <span style=\"background-color:#ececec;font-family:monospace;padding:0 5px\">!pip install --user --upgrade pixiedust</span></div>\n",
       "            "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>Please restart kernel after upgrading.</div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#SKIP_COMPARE_OUTPUT\n",
    "import pixiedust"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>abbr</th>\n",
       "      <th>medals.bronze</th>\n",
       "      <th>medals.gold</th>\n",
       "      <th>medals.silver</th>\n",
       "      <th>medals.total</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>RUS</td>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>21</td>\n",
       "      <td>Russian Fed.</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>USA</td>\n",
       "      <td>10</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "      <td>20</td>\n",
       "      <td>United States</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>NLD</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>20</td>\n",
       "      <td>Netherlands</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>NOR</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "      <td>Norway</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>CAN</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "      <td>16</td>\n",
       "      <td>Canada</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   abbr  medals.bronze  medals.gold  medals.silver  medals.total  \\\n",
       "65  RUS              7            6              8            21   \n",
       "81  USA             10            6              4            20   \n",
       "54  NLD              8            6              6            20   \n",
       "56  NOR              7            8              4            19   \n",
       "13  CAN              4            4              8            16   \n",
       "\n",
       "             name  \n",
       "65   Russian Fed.  \n",
       "81  United States  \n",
       "54    Netherlands  \n",
       "56         Norway  \n",
       "13         Canada  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from bokeh.sampledata.olympics2014 import data\n",
    "from pandas.io.json import json_normalize\n",
    "\n",
    "df = json_normalize(data['data'])\n",
    "\n",
    "# try:\n",
    "#     from bkcharts.utils import df_from_json\n",
    "# except ImportError:\n",
    "#     from bokeh.charts.utils import df_from_json\n",
    "\n",
    "# # utilize utility to make it easy to get json/dict data converted to a dataframe\n",
    "# df = df_from_json(data)\n",
    "\n",
    "# filter by countries with at least one medal and sort by total medals\n",
    "df = df[df['medals.total'] > 0]\n",
    "df = df.sort_values(\"medals.total\", ascending=False)\n",
    "\n",
    "# show top 5\n",
    "df.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pixiedust": {
     "displayParams": {
      "aggregation": "SUM",
      "binsize": "10",
      "chartsize": "96",
      "charttype": "stacked",
      "color": "abbr",
      "handlerId": "tableView",
      "keyFields": "name",
      "lineChartType": "subplots",
      "rendererId": "bokeh",
      "rowCount": "100",
      "showLegend": "true",
      "valueFields": "medals.total"
     }
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">.pd_warning{display:none;}</style><div class=\"pd_warning\"><em>Hey, there's something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>\n",
       "        <div class=\"pd_save is-viewer-good\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    <div id=\"chartFigure57d0987f\" class=\"pd_save is-viewer-good\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-57d0987f panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-57d0987f\" data-parent=\"#df-table-wrapper-57d0987f\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-57d0987f\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>abbr: </strong> object</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.bronze: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.gold: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.silver: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.total: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>name: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\">\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-57d0987f\" data-parent=\"#df-table-wrapper-57d0987f\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-57d0987f\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 26 of 26 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\">abbr</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">medals.bronze</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">medals.gold</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">medals.silver</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">medals.total</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">name</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th><div>abbr</div></th>\n",
       "                  \n",
       "                  <th><div>medals.bronze</div></th>\n",
       "                  \n",
       "                  <th><div>medals.gold</div></th>\n",
       "                  \n",
       "                  <th><div>medals.silver</div></th>\n",
       "                  \n",
       "                  <th><div>medals.total</div></th>\n",
       "                  \n",
       "                  <th><div>name</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>RUS</td>\n",
       "                  \n",
       "                  <td>7</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                  <td>21</td>\n",
       "                  \n",
       "                  <td>Russian Fed.</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>USA</td>\n",
       "                  \n",
       "                  <td>10</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>20</td>\n",
       "                  \n",
       "                  <td>United States</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>NLD</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>20</td>\n",
       "                  \n",
       "                  <td>Netherlands</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>NOR</td>\n",
       "                  \n",
       "                  <td>7</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>19</td>\n",
       "                  \n",
       "                  <td>Norway</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>CAN</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                  <td>16</td>\n",
       "                  \n",
       "                  <td>Canada</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>DEU</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>15</td>\n",
       "                  \n",
       "                  <td>Germany</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>CHE</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>10</td>\n",
       "                  \n",
       "                  <td>Switzerland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>FRA</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>10</td>\n",
       "                  \n",
       "                  <td>France</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>SWE</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                  <td>9</td>\n",
       "                  \n",
       "                  <td>Sweden</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>AUT</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>9</td>\n",
       "                  \n",
       "                  <td>Austria</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>SVN</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>7</td>\n",
       "                  \n",
       "                  <td>Slovenia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>JPN</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>7</td>\n",
       "                  \n",
       "                  <td>Japan</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>CHN</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>China</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>CZE</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>Czech Republic</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>ITA</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>Italy</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>BLR</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>6</td>\n",
       "                  \n",
       "                  <td>Belarus</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>POL</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>Poland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>KOR</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                  <td>Korea</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>AUS</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>Australia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>LVA</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>Latvia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>FIN</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                  <td>Finland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>GBR</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                  <td>Great Britain</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>SVK</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>Slovakia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>HRV</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>Croatia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>UKR</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>Ukraine</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>KAZ</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>0</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                  <td>Kazakhstan</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-57d0987f');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 26;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-57d0987f th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'></a>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'></a>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#SKIP_COMPARE_OUTPUT\n",
    "display(df, no_gen_tests='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_318deeec\">\n",
       "            <pd_event_handler pd_source=\"option_btn_318deeec\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer318deeec\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML318deeec');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML318deeec');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution318deeec\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution318deeec\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution318deeec\").length > 0 ){\n",
       "                    $(\"#execution318deeec\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone318deeec != \"undefined\"){\n",
       "                    onDisplayDone318deeec();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='tableView',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='318deeec',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS318deeec').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure318deeec\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-318deeec panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-318deeec\" data-parent=\"#df-table-wrapper-318deeec\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-318deeec\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>abbr: </strong> object</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.bronze: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.gold: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.silver: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>medals.total: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>name: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-318deeec\" data-parent=\"#df-table-wrapper-318deeec\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-318deeec\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 26 of 26 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >abbr</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >medals.bronze</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >medals.gold</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >medals.silver</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >medals.total</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >name</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>abbr</div></th>\n",
       "                  \n",
       "                  <th ><div>medals.bronze</div></th>\n",
       "                  \n",
       "                  <th ><div>medals.gold</div></th>\n",
       "                  \n",
       "                  <th ><div>medals.silver</div></th>\n",
       "                  \n",
       "                  <th ><div>medals.total</div></th>\n",
       "                  \n",
       "                  <th ><div>name</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >RUS</td>\n",
       "                  \n",
       "                  <td >7</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >8</td>\n",
       "                  \n",
       "                  <td >21</td>\n",
       "                  \n",
       "                  <td >Russian Fed.</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >USA</td>\n",
       "                  \n",
       "                  <td >10</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >20</td>\n",
       "                  \n",
       "                  <td >United States</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >NLD</td>\n",
       "                  \n",
       "                  <td >8</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >20</td>\n",
       "                  \n",
       "                  <td >Netherlands</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >NOR</td>\n",
       "                  \n",
       "                  <td >7</td>\n",
       "                  \n",
       "                  <td >8</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >19</td>\n",
       "                  \n",
       "                  <td >Norway</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >CAN</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >8</td>\n",
       "                  \n",
       "                  <td >16</td>\n",
       "                  \n",
       "                  <td >Canada</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >DEU</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >8</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >15</td>\n",
       "                  \n",
       "                  <td >Germany</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >CHE</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >10</td>\n",
       "                  \n",
       "                  <td >Switzerland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >FRA</td>\n",
       "                  \n",
       "                  <td >5</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >10</td>\n",
       "                  \n",
       "                  <td >France</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >SWE</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >5</td>\n",
       "                  \n",
       "                  <td >9</td>\n",
       "                  \n",
       "                  <td >Sweden</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >AUT</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >9</td>\n",
       "                  \n",
       "                  <td >Austria</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >SVN</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >7</td>\n",
       "                  \n",
       "                  <td >Slovenia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >JPN</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >7</td>\n",
       "                  \n",
       "                  <td >Japan</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >CHN</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >China</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >CZE</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >Czech Republic</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >ITA</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >Italy</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >BLR</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >5</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >6</td>\n",
       "                  \n",
       "                  <td >Belarus</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >POL</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >Poland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >KOR</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >4</td>\n",
       "                  \n",
       "                  <td >Korea</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >AUS</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >Australia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >LVA</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >Latvia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >FIN</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >3</td>\n",
       "                  \n",
       "                  <td >Finland</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >GBR</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >2</td>\n",
       "                  \n",
       "                  <td >Great Britain</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >SVK</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >Slovakia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >HRV</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >Croatia</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >UKR</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >Ukraine</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >KAZ</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >0</td>\n",
       "                  \n",
       "                  <td >1</td>\n",
       "                  \n",
       "                  <td >Kazakhstan</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-318deeec');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 26;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-318deeec th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschema318deeec\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschema318deeec\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearch318deeec\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearch318deeec\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocount318deeec\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocount318deeec\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrows318deeec\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" >Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" >Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=318deeec]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure318deeec\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML318deeec');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution318deeec\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution318deeec\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution318deeec\").length > 0 ){\n",
       "                    $(\"#execution318deeec\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone318deeec != \"undefined\"){\n",
       "                    onDisplayDone318deeec();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='tableView',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='318deeec',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS318deeec').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=318deeec]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure318deeec\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML318deeec');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution318deeec\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution318deeec\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution318deeec\").length > 0 ){\n",
       "                    $(\"#execution318deeec\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone318deeec != \"undefined\"){\n",
       "                    onDisplayDone318deeec();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='tableView',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='318deeec',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS318deeec').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='tableView',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='318deeec',color='abbr')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_2fe811d5\">\n",
       "            <pd_event_handler pd_source=\"option_btn_2fe811d5\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "        <label class=\"field\">Renderer:</label>\n",
       "        <select class=\"form-control\" id=\"renderer2fe811d5\" style=\"margin:0; display:inline-block; width:70%;\">\n",
       "            \n",
       "                <option value=\"matplotlib\" >matplotlib</option>\n",
       "            \n",
       "                <option value=\"bokeh\" selected>bokeh</option>\n",
       "            \n",
       "        </select>\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer2fe811d5\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2fe811d5');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2fe811d5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2fe811d5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2fe811d5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2fe811d5\").length > 0 ){\n",
       "                    $(\"#execution2fe811d5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2fe811d5 != \"undefined\"){\n",
       "                    onDisplayDone2fe811d5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='histogram',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='2fe811d5')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2fe811d5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure2fe811d5\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    <script class=\"pd_save\">\n",
       "                    function setChartScript() {\n",
       "                        if (!window.Bokeh) {\n",
       "                            setTimeout(setChartScript, 250)\n",
       "                        } else {\n",
       "                            var d = document.getElementById(\"pd-bkchartdiv-2fe811d5\")\n",
       "                            if (d){\n",
       "                                var el = document.createElement('div')\n",
       "                                el.innerHTML = `\n",
       "<script type=\"text/javascript\">\n",
       "  (function() {\n",
       "    var fn = function() {\n",
       "      Bokeh.safely(function() {\n",
       "        (function(root) {\n",
       "          function embed_document(root) {\n",
       "            \n",
       "          var docs_json = '{\"89bc98e8-fc2d-4aa3-bd9a-1f1f0166d3bb\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1424\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"1429\",\"type\":\"LinearAxis\"}],\"plot_height\":502,\"plot_width\":770,\"renderers\":[{\"id\":\"1424\",\"type\":\"LinearAxis\"},{\"id\":\"1428\",\"type\":\"Grid\"},{\"id\":\"1429\",\"type\":\"LinearAxis\"},{\"id\":\"1433\",\"type\":\"Grid\"},{\"id\":\"1442\",\"type\":\"BoxAnnotation\"},{\"id\":\"1452\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"1457\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"1440\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1416\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"1420\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"1418\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"1422\",\"type\":\"LinearScale\"}},\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1435\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1437\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1442\",\"type\":\"BoxAnnotation\"}},\"id\":\"1436\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"children\":[{\"id\":\"1469\",\"type\":\"ToolbarBox\"},{\"id\":\"1467\",\"type\":\"Column\"}]},\"id\":\"1470\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1459\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1430\",\"type\":\"BasicTicker\"}},\"id\":\"1433\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1466\",\"type\":\"Row\"}]},\"id\":\"1467\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"}]},\"id\":\"1466\",\"type\":\"Row\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1434\",\"type\":\"PanTool\"},{\"id\":\"1435\",\"type\":\"WheelZoomTool\"},{\"id\":\"1436\",\"type\":\"BoxZoomTool\"},{\"id\":\"1437\",\"type\":\"SaveTool\"},{\"id\":\"1438\",\"type\":\"ResetTool\"},{\"id\":\"1439\",\"type\":\"HelpTool\"},{\"id\":\"1454\",\"type\":\"HoverTool\"}]},\"id\":\"1440\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1462\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"1449\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1450\",\"type\":\"Quad\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1451\",\"type\":\"Quad\"},\"selection_glyph\":null,\"view\":{\"id\":\"1453\",\"type\":\"CDSView\"}},\"id\":\"1452\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"left\":{\"field\":\"left\"},\"line_color\":{\"value\":\"#cccccc\"},\"right\":{\"field\":\"right\"},\"top\":{\"field\":\"top\"}},\"id\":\"1450\",\"type\":\"Quad\"},{\"attributes\":{},\"id\":\"1425\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1461\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"1457\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"renderers\":\"auto\",\"tooltips\":[[\"Frequency\",\"@top{0.00}\"],[\"Interval\",\"@left - @right\"]]},\"id\":\"1454\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis_label\":\"medals.total\",\"formatter\":{\"id\":\"1459\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1425\",\"type\":\"BasicTicker\"}},\"id\":\"1424\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom\":{\"value\":0},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"left\":{\"field\":\"left\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"right\":{\"field\":\"right\"},\"top\":{\"field\":\"top\"}},\"id\":\"1451\",\"type\":\"Quad\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1449\",\"type\":\"ColumnDataSource\"}},\"id\":\"1453\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1434\",\"type\":\"PanTool\"},{\"id\":\"1435\",\"type\":\"WheelZoomTool\"},{\"id\":\"1436\",\"type\":\"BoxZoomTool\"},{\"id\":\"1437\",\"type\":\"SaveTool\"},{\"id\":\"1438\",\"type\":\"ResetTool\"},{\"id\":\"1439\",\"type\":\"HelpTool\"},{\"id\":\"1454\",\"type\":\"HoverTool\"}]},\"id\":\"1468\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"callback\":null,\"data\":{\"left\":{\"__ndarray__\":\"AAAAAAAA8D8AAAAAAAAIQAAAAAAAABRAAAAAAAAAHEAAAAAAAAAiQAAAAAAAACZAAAAAAAAAKkAAAAAAAAAuQAAAAAAAADFAAAAAAAAAM0A=\",\"dtype\":\"float64\",\"shape\":[10]},\"right\":{\"__ndarray__\":\"AAAAAAAACEAAAAAAAAAUQAAAAAAAABxAAAAAAAAAIkAAAAAAAAAmQAAAAAAAACpAAAAAAAAALkAAAAAAAAAxQAAAAAAAADNAAAAAAAAANUA=\",\"dtype\":\"float64\",\"shape\":[10]},\"top\":{\"__ndarray__\":\"2Ymd2ImduD/ZiZ3YiZ24PxQ7sRM7sbM/FDuxEzuxoz8UO7ETO7GzPwAAAAAAAAAAAAAAAAAAAAAUO7ETO7GjPwAAAAAAAAAAFDuxEzuxsz8=\",\"dtype\":\"float64\",\"shape\":[10]}},\"selected\":{\"id\":\"1463\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1462\",\"type\":\"UnionRenderers\"}},\"id\":\"1449\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1438\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1422\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1442\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1463\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"start\":0},\"id\":\"1418\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null},\"id\":\"1416\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Frequency\",\"formatter\":{\"id\":\"1461\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1430\",\"type\":\"BasicTicker\"}},\"id\":\"1429\",\"type\":\"LinearAxis\"},{\"attributes\":{\"toolbar\":{\"id\":\"1468\",\"type\":\"ProxyToolbar\"},\"toolbar_location\":\"above\"},\"id\":\"1469\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"plot\":{\"id\":\"1415\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1425\",\"type\":\"BasicTicker\"}},\"id\":\"1428\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1439\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1434\",\"type\":\"PanTool\"}],\"root_ids\":[\"1470\"]},\"title\":\"Bokeh Application\",\"version\":\"1.0.1\"}}';\n",
       "          var render_items = [{\"docid\":\"89bc98e8-fc2d-4aa3-bd9a-1f1f0166d3bb\",\"roots\":{\"1470\":\"ba336380-6812-4a79-98e5-9f305b61347f\"}}];\n",
       "          root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        \n",
       "          }\n",
       "          if (root.Bokeh !== undefined) {\n",
       "            embed_document(root);\n",
       "          } else {\n",
       "            var attempts = 0;\n",
       "            var timer = setInterval(function(root) {\n",
       "              if (root.Bokeh !== undefined) {\n",
       "                embed_document(root);\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "              attempts++;\n",
       "              if (attempts > 100) {\n",
       "                console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "            }, 10, root)\n",
       "          }\n",
       "        })(window);\n",
       "      });\n",
       "    };\n",
       "    if (document.readyState != \"loading\") fn();\n",
       "    else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "  })();\n",
       "<\\/script>`\n",
       "                                var chartscript = el.childNodes[1]\n",
       "                                var s = document.createElement(\"script\")\n",
       "                                s.innerHTML = chartscript.innerHTML\n",
       "                                d.parentNode.insertBefore(s, d)\n",
       "                            }\n",
       "                        }\n",
       "                    }\n",
       "                    if (!window.Bokeh && !window.autoload){\n",
       "                        window.autoload=true;\n",
       "                        \n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = 1;\n",
       "\n",
       "  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  \n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    }\n",
       "    finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        root._bokeh_is_loading--;\n",
       "        if (root._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.0.1.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i].call(root, root.Bokeh);\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));\n",
       "                    }\n",
       "                    setChartScript()\n",
       "                    </script>\n",
       "                    <div style=\"padding:5px\" id=\"pd-bkchartdiv-2fe811d5\">\n",
       "<div class=\"bk-root\" id=\"ba336380-6812-4a79-98e5-9f305b61347f\"></div></div>\n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Histogram Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsize2fe811d5\">96</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsize2fe811d5\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=96\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Bin Count: <span id=\"slidevalbinsize2fe811d5\">10</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderbinsize2fe811d5\"\n",
       "                        name=\"binsize\"\n",
       "                        data-min=2\n",
       "                        data-max=23\n",
       "                        data-default=10\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">color:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectcolor2fe811d5\" name=\"color\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"None\" >None</option>\n",
       "                        \n",
       "                            <option value=\"abbr\" >abbr</option>\n",
       "                        \n",
       "                            <option value=\"medals.bronze\" >medals.bronze</option>\n",
       "                        \n",
       "                            <option value=\"medals.gold\" >medals.gold</option>\n",
       "                        \n",
       "                            <option value=\"medals.silver\" >medals.silver</option>\n",
       "                        \n",
       "                            <option value=\"medals.total\" >medals.total</option>\n",
       "                        \n",
       "                            <option value=\"name\" >name</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=2fe811d5]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure2fe811d5\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2fe811d5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2fe811d5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2fe811d5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2fe811d5\").length > 0 ){\n",
       "                    $(\"#execution2fe811d5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2fe811d5 != \"undefined\"){\n",
       "                    onDisplayDone2fe811d5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='histogram',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='2fe811d5')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2fe811d5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=2fe811d5]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"2fe811d5]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigure2fe811d5');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2fe811d5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2fe811d5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2fe811d5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2fe811d5\").length > 0 ){\n",
       "                    $(\"#execution2fe811d5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2fe811d5 != \"undefined\"){\n",
       "                    onDisplayDone2fe811d5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='histogram',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='2fe811d5')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2fe811d5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"2fe811d5]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='histogram',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.total',nostore_cw='1098',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='2fe811d5')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_6103559e\">\n",
       "            <pd_event_handler pd_source=\"option_btn_6103559e\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "        <label class=\"field\">Renderer:</label>\n",
       "        <select class=\"form-control\" id=\"renderer6103559e\" style=\"margin:0; display:inline-block; width:70%;\">\n",
       "            \n",
       "                <option value=\"matplotlib\" >matplotlib</option>\n",
       "            \n",
       "                <option value=\"bokeh\" selected>bokeh</option>\n",
       "            \n",
       "        </select>\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer6103559e\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML6103559e');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML6103559e');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution6103559e\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution6103559e\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution6103559e\").length > 0 ){\n",
       "                    $(\"#execution6103559e\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone6103559e != \"undefined\"){\n",
       "                    onDisplayDone6103559e();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='scatterPlot',keyFields='medals.total',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='6103559e',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS6103559e').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure6103559e\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    <script class=\"pd_save\">\n",
       "                    function setChartScript() {\n",
       "                        if (!window.Bokeh) {\n",
       "                            setTimeout(setChartScript, 250)\n",
       "                        } else {\n",
       "                            var d = document.getElementById(\"pd-bkchartdiv-6103559e\")\n",
       "                            if (d){\n",
       "                                var el = document.createElement('div')\n",
       "                                el.innerHTML = `\n",
       "<script type=\"text/javascript\">\n",
       "  (function() {\n",
       "    var fn = function() {\n",
       "      Bokeh.safely(function() {\n",
       "        (function(root) {\n",
       "          function embed_document(root) {\n",
       "            \n",
       "          var docs_json = '{\"8345f48f-2cd6-41ec-ba2e-42898139709e\":{\"roots\":{\"references\":[{\"attributes\":{\"source\":{\"id\":\"5768\",\"type\":\"ColumnDataSource\"}},\"id\":\"5772\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#380499\"},\"line_color\":{\"value\":\"#380499\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5733\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[3],\"y\":[0]},\"selected\":{\"id\":\"5921\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5920\",\"type\":\"UnionRenderers\"}},\"id\":\"5864\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#B02A8F\"},\"line_color\":{\"value\":\"#B02A8F\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5925\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"6344\",\"type\":\"ColumnDataSource\"}},\"id\":\"6348\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#6A00A7\"},\"line_color\":{\"value\":\"#6A00A7\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5790\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5866\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"6293\",\"type\":\"ColumnDataSource\"}},\"id\":\"6297\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"5837\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5838\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5839\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5841\",\"type\":\"CDSView\"}},\"id\":\"5840\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"RUS\"},\"renderers\":[{\"id\":\"6347\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6396\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"6293\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6294\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6295\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6297\",\"type\":\"CDSView\"}},\"id\":\"6296\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#FDC427\"},\"line_color\":{\"value\":\"#FDC427\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6453\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5729\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6393\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"5732\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5733\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5734\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5736\",\"type\":\"CDSView\"}},\"id\":\"5735\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#A31D99\"},\"line_color\":{\"value\":\"#A31D99\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5894\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#F48947\"},\"line_color\":{\"value\":\"#F48947\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6245\",\"type\":\"Circle\"},{\"attributes\":{\"label\":{\"value\":\"AUT\"},\"renderers\":[{\"id\":\"5720\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5731\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#FDB52D\"},\"line_color\":{\"value\":\"#FDB52D\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6398\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6454\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"5717\",\"type\":\"ColumnDataSource\"}},\"id\":\"5721\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"5717\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5718\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5719\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5721\",\"type\":\"CDSView\"}},\"id\":\"5720\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6295\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[1],\"y\":[1]},\"selected\":{\"id\":\"6506\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6505\",\"type\":\"UnionRenderers\"}},\"id\":\"6397\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"5728\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"label\":{\"value\":\"CHE\"},\"renderers\":[{\"id\":\"5771\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5788\",\"type\":\"LegendItem\"},{\"attributes\":{\"label\":{\"value\":\"POL\"},\"renderers\":[{\"id\":\"6296\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6343\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[9],\"y\":[2]},\"selected\":{\"id\":\"6626\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6625\",\"type\":\"UnionRenderers\"}},\"id\":\"6509\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[7],\"y\":[2]},\"selected\":{\"id\":\"6565\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6564\",\"type\":\"UnionRenderers\"}},\"id\":\"6452\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"5893\",\"type\":\"ColumnDataSource\"}},\"id\":\"5897\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#F8963F\"},\"line_color\":{\"value\":\"#F8963F\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6294\",\"type\":\"Circle\"},{\"attributes\":{\"label\":{\"value\":\"FRA\"},\"renderers\":[{\"id\":\"5896\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5923\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"6240\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5926\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6341\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"NOR\"},\"renderers\":[{\"id\":\"6247\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6292\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"5764\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#5901A4\"},\"line_color\":{\"value\":\"#5901A4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5769\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[10],\"y\":[3]},\"selected\":{\"id\":\"5954\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5953\",\"type\":\"UnionRenderers\"}},\"id\":\"5893\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6346\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6394\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5860\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5719\",\"type\":\"Circle\"},{\"attributes\":{\"label\":{\"value\":\"FIN\"},\"renderers\":[{\"id\":\"5867\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5892\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#49029F\"},\"line_color\":{\"value\":\"#49029F\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5750\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6289\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[6],\"y\":[3]},\"selected\":{\"id\":\"5834\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5833\",\"type\":\"UnionRenderers\"}},\"id\":\"5789\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"5837\",\"type\":\"ColumnDataSource\"}},\"id\":\"5841\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"5749\",\"type\":\"ColumnDataSource\"}},\"id\":\"5753\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"5893\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5894\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5895\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5897\",\"type\":\"CDSView\"}},\"id\":\"5896\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"5785\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"6344\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6345\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6346\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6348\",\"type\":\"CDSView\"}},\"id\":\"6347\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#9612A0\"},\"line_color\":{\"value\":\"#9612A0\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5865\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"6244\",\"type\":\"ColumnDataSource\"}},\"id\":\"6248\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"6244\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6245\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6246\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6248\",\"type\":\"CDSView\"}},\"id\":\"6247\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"DEU\"},\"renderers\":[{\"id\":\"5840\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5863\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#FCA635\"},\"line_color\":{\"value\":\"#FCA635\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6345\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[2],\"y\":[1]},\"selected\":{\"id\":\"5989\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5988\",\"type\":\"UnionRenderers\"}},\"id\":\"5924\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6399\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"5768\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5769\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5770\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5772\",\"type\":\"CDSView\"}},\"id\":\"5771\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"5789\",\"type\":\"ColumnDataSource\"}},\"id\":\"5793\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5921\",\"type\":\"Selection\"},{\"attributes\":{\"data_source\":{\"id\":\"6452\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6453\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6454\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6456\",\"type\":\"CDSView\"}},\"id\":\"6455\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5751\",\"type\":\"Circle\"},{\"attributes\":{\"label\":{\"value\":\"SVK\"},\"renderers\":[{\"id\":\"6400\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6451\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5895\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5786\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5953\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5920\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6449\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5770\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5791\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6246\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5734\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5889\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6505\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[16],\"y\":[4]},\"selected\":{\"id\":\"5786\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5785\",\"type\":\"UnionRenderers\"}},\"id\":\"5749\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"label\":{\"value\":\"BLR\"},\"renderers\":[{\"id\":\"5735\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5748\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"6241\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6448\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"6452\",\"type\":\"ColumnDataSource\"}},\"id\":\"6456\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"5732\",\"type\":\"ColumnDataSource\"}},\"id\":\"5736\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[4],\"y\":[4]},\"selected\":{\"id\":\"6394\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6393\",\"type\":\"UnionRenderers\"}},\"id\":\"6293\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"6397\",\"type\":\"ColumnDataSource\"}},\"id\":\"6401\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"6290\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5746\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"5864\",\"type\":\"ColumnDataSource\"}},\"id\":\"5868\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"6397\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6398\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6399\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6401\",\"type\":\"CDSView\"}},\"id\":\"6400\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[1],\"y\":[0]},\"selected\":{\"id\":\"6149\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6148\",\"type\":\"UnionRenderers\"}},\"id\":\"6068\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[10],\"y\":[6]},\"selected\":{\"id\":\"5809\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5808\",\"type\":\"UnionRenderers\"}},\"id\":\"5768\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"5861\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5745\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5890\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6340\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"5924\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5925\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5926\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5928\",\"type\":\"CDSView\"}},\"id\":\"5927\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"CAN\"},\"renderers\":[{\"id\":\"5752\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5767\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"5864\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5865\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5866\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5868\",\"type\":\"CDSView\"}},\"id\":\"5867\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"5765\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"NLD\"},\"renderers\":[{\"id\":\"6200\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6243\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"5749\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5750\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5751\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5753\",\"type\":\"CDSView\"}},\"id\":\"5752\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"ITA\"},\"renderers\":[{\"id\":\"5995\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6028\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"5679\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#0C0786\"},\"line_color\":{\"value\":\"#0C0786\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5704\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"6629\",\"type\":\"ColumnDataSource\"}},\"id\":\"6633\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"6105\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5692\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"5713\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"6194\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5711\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"6509\",\"type\":\"ColumnDataSource\"}},\"id\":\"6513\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5834\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"KOR\"},\"renderers\":[{\"id\":\"6112\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6151\",\"type\":\"LegendItem\"},{\"attributes\":{\"label\":{\"value\":\"UKR\"},\"renderers\":[{\"id\":\"6571\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6628\",\"type\":\"LegendItem\"},{\"attributes\":{\"source\":{\"id\":\"5992\",\"type\":\"ColumnDataSource\"}},\"id\":\"5996\",\"type\":\"CDSView\"},{\"attributes\":{\"label\":{\"value\":\"AUS\"},\"renderers\":[{\"id\":\"5706\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5716\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#250591\"},\"line_color\":{\"value\":\"#250591\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5718\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5814\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6199\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#7901A8\"},\"line_color\":{\"value\":\"#7901A8\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5813\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"5957\",\"type\":\"ColumnDataSource\"}},\"id\":\"5961\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#EE7C50\"},\"line_color\":{\"value\":\"#EE7C50\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6198\",\"type\":\"Circle\"},{\"attributes\":{\"dimension\":1,\"grid_line_alpha\":{\"value\":0.3},\"plot\":{\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5684\",\"type\":\"BasicTicker\"}},\"id\":\"5687\",\"type\":\"Grid\"},{\"attributes\":{\"label\":{\"value\":\"KAZ\"},\"renderers\":[{\"id\":\"6071\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6108\",\"type\":\"LegendItem\"},{\"attributes\":{\"label\":{\"value\":\"SWE\"},\"renderers\":[{\"id\":\"6512\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6567\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[6],\"y\":[0]},\"selected\":{\"id\":\"6065\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6064\",\"type\":\"UnionRenderers\"}},\"id\":\"5992\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"6025\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6688\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"6629\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6630\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6631\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6633\",\"type\":\"CDSView\"}},\"id\":\"6632\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"5696\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data_source\":{\"id\":\"6029\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6030\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6031\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6033\",\"type\":\"CDSView\"}},\"id\":\"6032\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"CZE\"},\"renderers\":[{\"id\":\"5815\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5836\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#E06461\"},\"line_color\":{\"value\":\"#E06461\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6110\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"6568\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6569\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6570\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6572\",\"type\":\"CDSView\"}},\"id\":\"6571\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[6],\"y\":[1]},\"selected\":{\"id\":\"5861\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5860\",\"type\":\"UnionRenderers\"}},\"id\":\"5812\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[1],\"y\":[0]},\"selected\":{\"id\":\"6026\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6025\",\"type\":\"UnionRenderers\"}},\"id\":\"5957\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"5703\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5704\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5705\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5707\",\"type\":\"CDSView\"}},\"id\":\"5706\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data_source\":{\"id\":\"5957\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5958\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5959\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5961\",\"type\":\"CDSView\"}},\"id\":\"5960\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"6109\",\"type\":\"ColumnDataSource\"}},\"id\":\"6113\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"5789\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5790\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5791\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5793\",\"type\":\"CDSView\"}},\"id\":\"5792\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6111\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6565\",\"type\":\"Selection\"},{\"attributes\":{\"data_source\":{\"id\":\"5812\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5813\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5814\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5816\",\"type\":\"CDSView\"}},\"id\":\"5815\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"6754\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[3],\"y\":[0]},\"selected\":{\"id\":\"5729\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5728\",\"type\":\"UnionRenderers\"}},\"id\":\"5703\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5839\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6065\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[9],\"y\":[2]},\"selected\":{\"id\":\"5746\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5745\",\"type\":\"UnionRenderers\"}},\"id\":\"5717\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"6152\",\"type\":\"ColumnDataSource\"}},\"id\":\"6156\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"6568\",\"type\":\"ColumnDataSource\"}},\"id\":\"6572\",\"type\":\"CDSView\"},{\"attributes\":{\"label\":{\"value\":\"HRV\"},\"renderers\":[{\"id\":\"5960\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5991\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[20],\"y\":[6]},\"selected\":{\"id\":\"6290\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6289\",\"type\":\"UnionRenderers\"}},\"id\":\"6197\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[21],\"y\":[6]},\"selected\":{\"id\":\"6449\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6448\",\"type\":\"UnionRenderers\"}},\"id\":\"6344\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"grid_line_alpha\":{\"value\":0.3},\"plot\":{\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5679\",\"type\":\"BasicTicker\"}},\"id\":\"5682\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5994\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"6197\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6198\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6199\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6201\",\"type\":\"CDSView\"}},\"id\":\"6200\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#8807A5\"},\"line_color\":{\"value\":\"#8807A5\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5838\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6193\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[15],\"y\":[8]},\"selected\":{\"id\":\"5890\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5889\",\"type\":\"UnionRenderers\"}},\"id\":\"5837\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#FAD524\"},\"line_color\":{\"value\":\"#FAD524\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6510\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6026\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"JPN\"},\"renderers\":[{\"id\":\"6032\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6067\",\"type\":\"LegendItem\"},{\"attributes\":{\"data_source\":{\"id\":\"6509\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6510\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6511\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6513\",\"type\":\"CDSView\"}},\"id\":\"6512\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"renderers\":\"auto\",\"tooltips\":[[\"medals.total\",\"@x\"],[\"medals.gold\",\"@y\"]]},\"id\":\"6692\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"6064\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"label\":{\"value\":\"LVA\"},\"renderers\":[{\"id\":\"6155\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6196\",\"type\":\"LegendItem\"},{\"attributes\":{\"label\":{\"value\":\"CHN\"},\"renderers\":[{\"id\":\"5792\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5811\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null},\"id\":\"5670\",\"type\":\"DataRange1d\"},{\"attributes\":{\"label\":{\"value\":\"USA\"},\"renderers\":[{\"id\":\"6632\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6691\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"6148\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"5992\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"5993\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5994\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"5996\",\"type\":\"CDSView\"}},\"id\":\"5995\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"6564\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6149\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"medals.total\",\"formatter\":{\"id\":\"5711\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5679\",\"type\":\"BasicTicker\"}},\"id\":\"5678\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#F6E525\"},\"line_color\":{\"value\":\"#F6E525\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6569\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5674\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[19],\"y\":[8]},\"selected\":{\"id\":\"6341\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6340\",\"type\":\"UnionRenderers\"}},\"id\":\"6244\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#EFF821\"},\"line_color\":{\"value\":\"#EFF821\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6630\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"5812\",\"type\":\"ColumnDataSource\"}},\"id\":\"5816\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#CF4B74\"},\"line_color\":{\"value\":\"#CF4B74\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6030\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6154\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6570\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5688\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"5689\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"5954\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6689\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6753\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6106\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6506\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[3],\"y\":[0]},\"selected\":{\"id\":\"6241\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6240\",\"type\":\"UnionRenderers\"}},\"id\":\"6152\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"overlay\":{\"id\":\"5696\",\"type\":\"BoxAnnotation\"}},\"id\":\"5690\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"6197\",\"type\":\"ColumnDataSource\"}},\"id\":\"6201\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5691\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"5809\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6626\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5676\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"6029\",\"type\":\"ColumnDataSource\"}},\"id\":\"6033\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6631\",\"type\":\"Circle\"},{\"attributes\":{\"below\":[{\"id\":\"5678\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"5683\",\"type\":\"LinearAxis\"}],\"plot_height\":497,\"plot_width\":696,\"renderers\":[{\"id\":\"5678\",\"type\":\"LinearAxis\"},{\"id\":\"5682\",\"type\":\"Grid\"},{\"id\":\"5683\",\"type\":\"LinearAxis\"},{\"id\":\"5687\",\"type\":\"Grid\"},{\"id\":\"5696\",\"type\":\"BoxAnnotation\"},{\"id\":\"5715\",\"type\":\"Legend\"},{\"id\":\"5706\",\"type\":\"GlyphRenderer\"},{\"id\":\"5720\",\"type\":\"GlyphRenderer\"},{\"id\":\"5735\",\"type\":\"GlyphRenderer\"},{\"id\":\"5752\",\"type\":\"GlyphRenderer\"},{\"id\":\"5771\",\"type\":\"GlyphRenderer\"},{\"id\":\"5792\",\"type\":\"GlyphRenderer\"},{\"id\":\"5815\",\"type\":\"GlyphRenderer\"},{\"id\":\"5840\",\"type\":\"GlyphRenderer\"},{\"id\":\"5867\",\"type\":\"GlyphRenderer\"},{\"id\":\"5896\",\"type\":\"GlyphRenderer\"},{\"id\":\"5927\",\"type\":\"GlyphRenderer\"},{\"id\":\"5960\",\"type\":\"GlyphRenderer\"},{\"id\":\"5995\",\"type\":\"GlyphRenderer\"},{\"id\":\"6032\",\"type\":\"GlyphRenderer\"},{\"id\":\"6071\",\"type\":\"GlyphRenderer\"},{\"id\":\"6112\",\"type\":\"GlyphRenderer\"},{\"id\":\"6155\",\"type\":\"GlyphRenderer\"},{\"id\":\"6200\",\"type\":\"GlyphRenderer\"},{\"id\":\"6247\",\"type\":\"GlyphRenderer\"},{\"id\":\"6296\",\"type\":\"GlyphRenderer\"},{\"id\":\"6347\",\"type\":\"GlyphRenderer\"},{\"id\":\"6400\",\"type\":\"GlyphRenderer\"},{\"id\":\"6455\",\"type\":\"GlyphRenderer\"},{\"id\":\"6512\",\"type\":\"GlyphRenderer\"},{\"id\":\"6571\",\"type\":\"GlyphRenderer\"},{\"id\":\"6632\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"5709\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"5694\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"5670\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"5674\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"5672\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"5676\",\"type\":\"LinearScale\"}},\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis_label\":\"medals.gold\",\"formatter\":{\"id\":\"5713\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5684\",\"type\":\"BasicTicker\"}},\"id\":\"5683\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"6068\",\"type\":\"ColumnDataSource\"}},\"id\":\"6072\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5833\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"6109\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6110\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6111\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6113\",\"type\":\"CDSView\"}},\"id\":\"6112\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null},\"id\":\"5672\",\"type\":\"DataRange1d\"},{\"attributes\":{\"label\":{\"value\":\"GBR\"},\"renderers\":[{\"id\":\"5927\",\"type\":\"GlyphRenderer\"}]},\"id\":\"5956\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[7],\"y\":[1]},\"selected\":{\"id\":\"6106\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6105\",\"type\":\"UnionRenderers\"}},\"id\":\"6029\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"items\":[{\"id\":\"5716\",\"type\":\"LegendItem\"},{\"id\":\"5731\",\"type\":\"LegendItem\"},{\"id\":\"5748\",\"type\":\"LegendItem\"},{\"id\":\"5767\",\"type\":\"LegendItem\"},{\"id\":\"5788\",\"type\":\"LegendItem\"},{\"id\":\"5811\",\"type\":\"LegendItem\"},{\"id\":\"5836\",\"type\":\"LegendItem\"},{\"id\":\"5863\",\"type\":\"LegendItem\"},{\"id\":\"5892\",\"type\":\"LegendItem\"},{\"id\":\"5923\",\"type\":\"LegendItem\"},{\"id\":\"5956\",\"type\":\"LegendItem\"},{\"id\":\"5991\",\"type\":\"LegendItem\"},{\"id\":\"6028\",\"type\":\"LegendItem\"},{\"id\":\"6067\",\"type\":\"LegendItem\"},{\"id\":\"6108\",\"type\":\"LegendItem\"},{\"id\":\"6151\",\"type\":\"LegendItem\"},{\"id\":\"6196\",\"type\":\"LegendItem\"},{\"id\":\"6243\",\"type\":\"LegendItem\"},{\"id\":\"6292\",\"type\":\"LegendItem\"},{\"id\":\"6343\",\"type\":\"LegendItem\"},{\"id\":\"6396\",\"type\":\"LegendItem\"},{\"id\":\"6451\",\"type\":\"LegendItem\"},{\"id\":\"6508\",\"type\":\"LegendItem\"},{\"id\":\"6567\",\"type\":\"LegendItem\"},{\"id\":\"6628\",\"type\":\"LegendItem\"},{\"id\":\"6691\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"5669\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"5715\",\"type\":\"Legend\"},{\"attributes\":{\"label\":{\"value\":\"SVN\"},\"renderers\":[{\"id\":\"6455\",\"type\":\"GlyphRenderer\"}]},\"id\":\"6508\",\"type\":\"LegendItem\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#E87059\"},\"line_color\":{\"value\":\"#E87059\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6153\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5693\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5959\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#C5407D\"},\"line_color\":{\"value\":\"#C5407D\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5993\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6070\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"6068\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6069\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6070\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6072\",\"type\":\"CDSView\"}},\"id\":\"6071\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"5924\",\"type\":\"ColumnDataSource\"}},\"id\":\"5928\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"6625\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"5709\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"5988\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5808\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[6],\"y\":[5]},\"selected\":{\"id\":\"5765\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"5764\",\"type\":\"UnionRenderers\"}},\"id\":\"5732\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[4],\"y\":[2]},\"selected\":{\"id\":\"6194\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6193\",\"type\":\"UnionRenderers\"}},\"id\":\"6109\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[1],\"y\":[0]},\"selected\":{\"id\":\"6689\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6688\",\"type\":\"UnionRenderers\"}},\"id\":\"6568\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6511\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5705\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6031\",\"type\":\"Circle\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"5688\",\"type\":\"PanTool\"},{\"id\":\"5689\",\"type\":\"WheelZoomTool\"},{\"id\":\"5690\",\"type\":\"BoxZoomTool\"},{\"id\":\"5691\",\"type\":\"SaveTool\"},{\"id\":\"5692\",\"type\":\"ResetTool\"},{\"id\":\"5693\",\"type\":\"HelpTool\"},{\"id\":\"6692\",\"type\":\"HoverTool\"}]},\"id\":\"5694\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#BB3586\"},\"line_color\":{\"value\":\"#BB3586\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5958\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"#D7576B\"},\"line_color\":{\"value\":\"#D7576B\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6069\",\"type\":\"Circle\"},{\"attributes\":{\"data_source\":{\"id\":\"6152\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"6153\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"6154\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6156\",\"type\":\"CDSView\"}},\"id\":\"6155\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[20],\"y\":[6]},\"selected\":{\"id\":\"6754\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"6753\",\"type\":\"UnionRenderers\"}},\"id\":\"6629\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"5703\",\"type\":\"ColumnDataSource\"}},\"id\":\"5707\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5989\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5684\",\"type\":\"BasicTicker\"}],\"root_ids\":[\"5669\"]},\"title\":\"Bokeh Application\",\"version\":\"1.0.1\"}}';\n",
       "          var render_items = [{\"docid\":\"8345f48f-2cd6-41ec-ba2e-42898139709e\",\"roots\":{\"5669\":\"c9d0a545-0986-4ca7-a061-fe481d20a50c\"}}];\n",
       "          root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        \n",
       "          }\n",
       "          if (root.Bokeh !== undefined) {\n",
       "            embed_document(root);\n",
       "          } else {\n",
       "            var attempts = 0;\n",
       "            var timer = setInterval(function(root) {\n",
       "              if (root.Bokeh !== undefined) {\n",
       "                embed_document(root);\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "              attempts++;\n",
       "              if (attempts > 100) {\n",
       "                console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "            }, 10, root)\n",
       "          }\n",
       "        })(window);\n",
       "      });\n",
       "    };\n",
       "    if (document.readyState != \"loading\") fn();\n",
       "    else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "  })();\n",
       "<\\/script>`\n",
       "                                var chartscript = el.childNodes[1]\n",
       "                                var s = document.createElement(\"script\")\n",
       "                                s.innerHTML = chartscript.innerHTML\n",
       "                                d.parentNode.insertBefore(s, d)\n",
       "                            }\n",
       "                        }\n",
       "                    }\n",
       "                    if (!window.Bokeh && !window.autoload){\n",
       "                        window.autoload=true;\n",
       "                        \n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = 1;\n",
       "\n",
       "  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  \n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    }\n",
       "    finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        root._bokeh_is_loading--;\n",
       "        if (root._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.0.1.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i].call(root, root.Bokeh);\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));\n",
       "                    }\n",
       "                    setChartScript()\n",
       "                    </script>\n",
       "                    <div style=\"padding:5px\" id=\"pd-bkchartdiv-6103559e\">\n",
       "<div class=\"bk-root\" id=\"c9d0a545-0986-4ca7-a061-fe481d20a50c\"></div></div>\n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Scatter Plot Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsize6103559e\">96</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsize6103559e\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=96\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">color:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectcolor6103559e\" name=\"color\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"None\" >None</option>\n",
       "                        \n",
       "                            <option value=\"abbr\" selected>abbr</option>\n",
       "                        \n",
       "                            <option value=\"medals.bronze\" >medals.bronze</option>\n",
       "                        \n",
       "                            <option value=\"medals.silver\" >medals.silver</option>\n",
       "                        \n",
       "                            <option value=\"name\" >name</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=6103559e]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure6103559e\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML6103559e');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution6103559e\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution6103559e\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution6103559e\").length > 0 ){\n",
       "                    $(\"#execution6103559e\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone6103559e != \"undefined\"){\n",
       "                    onDisplayDone6103559e();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='scatterPlot',keyFields='medals.total',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='6103559e',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS6103559e').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=6103559e]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"6103559e]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigure6103559e');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML6103559e');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution6103559e\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution6103559e\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution6103559e\").length > 0 ){\n",
       "                    $(\"#execution6103559e\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone6103559e != \"undefined\"){\n",
       "                    onDisplayDone6103559e();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='scatterPlot',keyFields='medals.total',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='6103559e',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS6103559e').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"6103559e]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='scatterPlot',keyFields='medals.total',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='6103559e',color='abbr')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_4f9da661\">\n",
       "            <pd_event_handler pd_source=\"option_btn_4f9da661\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "        <label class=\"field\">Renderer:</label>\n",
       "        <select class=\"form-control\" id=\"renderer4f9da661\" style=\"margin:0; display:inline-block; width:70%;\">\n",
       "            \n",
       "                <option value=\"matplotlib\" >matplotlib</option>\n",
       "            \n",
       "                <option value=\"bokeh\" selected>bokeh</option>\n",
       "            \n",
       "        </select>\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer4f9da661\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML4f9da661');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4f9da661');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4f9da661\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4f9da661\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4f9da661\").length > 0 ){\n",
       "                    $(\"#execution4f9da661\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4f9da661 != \"undefined\"){\n",
       "                    onDisplayDone4f9da661();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='lineChart',keyFields='medals.silver',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='4f9da661',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4f9da661').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure4f9da661\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    <script class=\"pd_save\">\n",
       "                    function setChartScript() {\n",
       "                        if (!window.Bokeh) {\n",
       "                            setTimeout(setChartScript, 250)\n",
       "                        } else {\n",
       "                            var d = document.getElementById(\"pd-bkchartdiv-4f9da661\")\n",
       "                            if (d){\n",
       "                                var el = document.createElement('div')\n",
       "                                el.innerHTML = `\n",
       "<script type=\"text/javascript\">\n",
       "  (function() {\n",
       "    var fn = function() {\n",
       "      Bokeh.safely(function() {\n",
       "        (function(root) {\n",
       "          function embed_document(root) {\n",
       "            \n",
       "          var docs_json = '{\"21331f93-0251-4fb4-857d-b6d0a0a89a61\":{\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"7366\",\"type\":\"Row\"}]},\"id\":\"7367\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"7349\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"children\":[{\"id\":\"7369\",\"type\":\"ToolbarBox\"},{\"id\":\"7367\",\"type\":\"Column\"}]},\"id\":\"7370\",\"type\":\"Column\"},{\"attributes\":{\"callback\":null,\"renderers\":\"auto\",\"tooltips\":[[\"medals.silver\",\"@x\"],[\"medals.gold\",\"@y{0.00}\"],[\"x\",\"$x\"],[\"y\",\"$y\"]]},\"id\":\"7355\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"7313\",\"type\":\"LinearScale\"},{\"attributes\":{\"tools\":[{\"id\":\"7327\",\"type\":\"PanTool\"},{\"id\":\"7328\",\"type\":\"WheelZoomTool\"},{\"id\":\"7329\",\"type\":\"BoxZoomTool\"},{\"id\":\"7330\",\"type\":\"SaveTool\"},{\"id\":\"7331\",\"type\":\"ResetTool\"},{\"id\":\"7332\",\"type\":\"HelpTool\"},{\"id\":\"7355\",\"type\":\"HoverTool\"}]},\"id\":\"7368\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"axis_label\":\"medals.gold\",\"formatter\":{\"id\":\"7351\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7323\",\"type\":\"BasicTicker\"}},\"id\":\"7322\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7330\",\"type\":\"SaveTool\"},{\"attributes\":{\"children\":[{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"}]},\"id\":\"7366\",\"type\":\"Row\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7323\",\"type\":\"BasicTicker\"}},\"id\":\"7326\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"7331\",\"type\":\"ResetTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"7327\",\"type\":\"PanTool\"},{\"id\":\"7328\",\"type\":\"WheelZoomTool\"},{\"id\":\"7329\",\"type\":\"BoxZoomTool\"},{\"id\":\"7330\",\"type\":\"SaveTool\"},{\"id\":\"7331\",\"type\":\"ResetTool\"},{\"id\":\"7332\",\"type\":\"HelpTool\"},{\"id\":\"7355\",\"type\":\"HoverTool\"}]},\"id\":\"7333\",\"type\":\"Toolbar\"},{\"attributes\":{\"callback\":null},\"id\":\"7311\",\"type\":\"DataRange1d\"},{\"attributes\":{\"label\":{\"value\":\"medals.gold\"},\"renderers\":[{\"id\":\"7345\",\"type\":\"GlyphRenderer\"}]},\"id\":\"7354\",\"type\":\"LegendItem\"},{\"attributes\":{\"callback\":null,\"data\":{\"x\":[0,1,2,3,4,5,6,8],\"y\":[11,4,6,15,15,2,8,10]},\"selected\":{\"id\":\"7363\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"7362\",\"type\":\"UnionRenderers\"}},\"id\":\"7342\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"7363\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7344\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"7318\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"7332\",\"type\":\"HelpTool\"},{\"attributes\":{\"plot\":{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7318\",\"type\":\"BasicTicker\"}},\"id\":\"7321\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"7328\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"toolbar\":{\"id\":\"7368\",\"type\":\"ProxyToolbar\"},\"toolbar_location\":\"above\"},\"id\":\"7369\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"axis_label\":\"medals.silver\",\"formatter\":{\"id\":\"7349\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7318\",\"type\":\"BasicTicker\"}},\"id\":\"7317\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7327\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"7335\",\"type\":\"BoxAnnotation\"}},\"id\":\"7329\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"7351\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"items\":[{\"id\":\"7354\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"7353\",\"type\":\"Legend\"},{\"attributes\":{\"data_source\":{\"id\":\"7342\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"7343\",\"type\":\"Line\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"7344\",\"type\":\"Line\"},\"selection_glyph\":null,\"view\":{\"id\":\"7346\",\"type\":\"CDSView\"}},\"id\":\"7345\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"below\":[{\"id\":\"7317\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"7322\",\"type\":\"LinearAxis\"}],\"plot_height\":502,\"plot_width\":701,\"renderers\":[{\"id\":\"7317\",\"type\":\"LinearAxis\"},{\"id\":\"7321\",\"type\":\"Grid\"},{\"id\":\"7322\",\"type\":\"LinearAxis\"},{\"id\":\"7326\",\"type\":\"Grid\"},{\"id\":\"7335\",\"type\":\"BoxAnnotation\"},{\"id\":\"7353\",\"type\":\"Legend\"},{\"id\":\"7345\",\"type\":\"GlyphRenderer\"}],\"title\":null,\"toolbar\":{\"id\":\"7333\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"7309\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"7313\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"7311\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"7315\",\"type\":\"LinearScale\"}},\"id\":\"7307\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"7315\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7343\",\"type\":\"Line\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"7335\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"7323\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"7362\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"7342\",\"type\":\"ColumnDataSource\"}},\"id\":\"7346\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null},\"id\":\"7309\",\"type\":\"DataRange1d\"}],\"root_ids\":[\"7370\"]},\"title\":\"Bokeh Application\",\"version\":\"1.0.1\"}}';\n",
       "          var render_items = [{\"docid\":\"21331f93-0251-4fb4-857d-b6d0a0a89a61\",\"roots\":{\"7370\":\"ade62cef-748e-4231-b65f-b586b6d9b680\"}}];\n",
       "          root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        \n",
       "          }\n",
       "          if (root.Bokeh !== undefined) {\n",
       "            embed_document(root);\n",
       "          } else {\n",
       "            var attempts = 0;\n",
       "            var timer = setInterval(function(root) {\n",
       "              if (root.Bokeh !== undefined) {\n",
       "                embed_document(root);\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "              attempts++;\n",
       "              if (attempts > 100) {\n",
       "                console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "            }, 10, root)\n",
       "          }\n",
       "        })(window);\n",
       "      });\n",
       "    };\n",
       "    if (document.readyState != \"loading\") fn();\n",
       "    else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "  })();\n",
       "<\\/script>`\n",
       "                                var chartscript = el.childNodes[1]\n",
       "                                var s = document.createElement(\"script\")\n",
       "                                s.innerHTML = chartscript.innerHTML\n",
       "                                d.parentNode.insertBefore(s, d)\n",
       "                            }\n",
       "                        }\n",
       "                    }\n",
       "                    if (!window.Bokeh && !window.autoload){\n",
       "                        window.autoload=true;\n",
       "                        \n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = 1;\n",
       "\n",
       "  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  \n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    }\n",
       "    finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        root._bokeh_is_loading--;\n",
       "        if (root._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.0.1.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i].call(root, root.Bokeh);\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));\n",
       "                    }\n",
       "                    setChartScript()\n",
       "                    </script>\n",
       "                    <div style=\"padding:5px\" id=\"pd-bkchartdiv-4f9da661\">\n",
       "<div class=\"bk-root\" id=\"ade62cef-748e-4231-b65f-b586b6d9b680\"></div></div>\n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Line Chart Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsize4f9da661\">96</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsize4f9da661\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=96\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Cluster By:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectclusterby4f9da661\" name=\"clusterby\" r=\"t\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"None\" >None</option>\n",
       "                        \n",
       "                            <option value=\"abbr\" >abbr</option>\n",
       "                        \n",
       "                            <option value=\"medals.bronze\" >medals.bronze</option>\n",
       "                        \n",
       "                            <option value=\"medals.total\" >medals.total</option>\n",
       "                        \n",
       "                            <option value=\"name\" >name</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtimeseries4f9da661\" r=\"f\" type=\"checkbox\" name=\"timeseries\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtimeseries4f9da661\">Time Series</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlegend4f9da661\" r=\"f\" type=\"checkbox\" name=\"legend\"\n",
       "                                checked>\n",
       "                    <label for=\"optioncheckedlegend4f9da661\">Show legend</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlogx4f9da661\" r=\"f\" type=\"checkbox\" name=\"logx\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedlogx4f9da661\">log scale on x</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlogy4f9da661\" r=\"f\" type=\"checkbox\" name=\"logy\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedlogy4f9da661\">log scale on y</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=4f9da661]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure4f9da661\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4f9da661');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4f9da661\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4f9da661\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4f9da661\").length > 0 ){\n",
       "                    $(\"#execution4f9da661\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4f9da661 != \"undefined\"){\n",
       "                    onDisplayDone4f9da661();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='lineChart',keyFields='medals.silver',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='4f9da661',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4f9da661').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=4f9da661]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure4f9da661\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4f9da661');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4f9da661\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4f9da661\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4f9da661\").length > 0 ){\n",
       "                    $(\"#execution4f9da661\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4f9da661 != \"undefined\"){\n",
       "                    onDisplayDone4f9da661();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='lineChart',keyFields='medals.silver',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='4f9da661',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4f9da661').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=4f9da661]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"4f9da661]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigure4f9da661');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4f9da661');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4f9da661\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4f9da661\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4f9da661\").length > 0 ){\n",
       "                    $(\"#execution4f9da661\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4f9da661 != \"undefined\"){\n",
       "                    onDisplayDone4f9da661();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='lineChart',keyFields='medals.silver',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='4f9da661',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4f9da661').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"4f9da661]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='lineChart',keyFields='medals.silver',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='4f9da661',color='abbr')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_8c0c4ba5\">\n",
       "            <pd_event_handler pd_source=\"option_btn_8c0c4ba5\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "        <label class=\"field\">Renderer:</label>\n",
       "        <select class=\"form-control\" id=\"renderer8c0c4ba5\" style=\"margin:0; display:inline-block; width:70%;\">\n",
       "            \n",
       "                <option value=\"matplotlib\" >matplotlib</option>\n",
       "            \n",
       "                <option value=\"bokeh\" selected>bokeh</option>\n",
       "            \n",
       "        </select>\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer8c0c4ba5\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML8c0c4ba5');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML8c0c4ba5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution8c0c4ba5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution8c0c4ba5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution8c0c4ba5\").length > 0 ){\n",
       "                    $(\"#execution8c0c4ba5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone8c0c4ba5 != \"undefined\"){\n",
       "                    onDisplayDone8c0c4ba5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='barChart',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.bronze,medals.silver,medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='8c0c4ba5',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS8c0c4ba5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure8c0c4ba5\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    <script class=\"pd_save\">\n",
       "                    function setChartScript() {\n",
       "                        if (!window.Bokeh) {\n",
       "                            setTimeout(setChartScript, 250)\n",
       "                        } else {\n",
       "                            var d = document.getElementById(\"pd-bkchartdiv-8c0c4ba5\")\n",
       "                            if (d){\n",
       "                                var el = document.createElement('div')\n",
       "                                el.innerHTML = `\n",
       "<script type=\"text/javascript\">\n",
       "  (function() {\n",
       "    var fn = function() {\n",
       "      Bokeh.safely(function() {\n",
       "        (function(root) {\n",
       "          function embed_document(root) {\n",
       "            \n",
       "          var docs_json = '{\"608a1a97-46af-4d9d-8153-403bb8d1ce5b\":{\"roots\":{\"references\":[{\"attributes\":{},\"id\":\"7812\",\"type\":\"CategoricalTicker\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7835\",\"type\":\"Stack\"}},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"expr\":{\"id\":\"7836\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7843\",\"type\":\"VBar\"},{\"attributes\":{\"fields\":[]},\"id\":\"7835\",\"type\":\"Stack\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7839\",\"type\":\"Stack\"}},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"expr\":{\"id\":\"7840\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7870\",\"type\":\"VBar\"},{\"attributes\":{\"callback\":null,\"renderers\":\"auto\",\"tooltips\":[[\"name\",\"@pd_stacked_col{0.00}\"],[\"medals.bronze\",\"@medals.bronze{0.00}\"],[\"medals.silver\",\"@medals.silver{0.00}\"],[\"medals.gold\",\"@medals.gold{0.00}\"]]},\"id\":\"7882\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"7850\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7839\",\"type\":\"Stack\"}},\"fill_color\":{\"value\":\"#2ca02c\"},\"line_color\":{\"value\":\"#2ca02c\"},\"top\":{\"expr\":{\"id\":\"7840\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7869\",\"type\":\"VBar\"},{\"attributes\":{\"fields\":[\"medals.bronze\"]},\"id\":\"7837\",\"type\":\"Stack\"},{\"attributes\":{\"fields\":[\"medals.bronze\",\"medals.silver\",\"medals.gold\"]},\"id\":\"7840\",\"type\":\"Stack\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7837\",\"type\":\"Stack\"}},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"expr\":{\"id\":\"7838\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7856\",\"type\":\"VBar\"},{\"attributes\":{\"data_source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"7855\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"name\":\"medals.silver\",\"nonselection_glyph\":{\"id\":\"7856\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"7858\",\"type\":\"CDSView\"}},\"id\":\"7857\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fields\":[\"medals.bronze\",\"medals.silver\"]},\"id\":\"7838\",\"type\":\"Stack\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"},\"xrange\":[\"Australia\",\"Austria\",\"Belarus\",\"Canada\",\"China\",\"Croatia\",\"Czech Republic\",\"Finland\",\"France\",\"Germany\",\"Great Britain\",\"Italy\",\"Japan\",\"Kazakhstan\",\"Korea\",\"Latvia\",\"Netherlands\",\"Norway\",\"Poland\",\"Russian Fed.\",\"Slovakia\",\"Slovenia\",\"Sweden\",\"Switzerland\",\"Ukraine\",\"United States\"]},\"code\":\"            $(document).trigger(&#x27;pd_event&#x27;,{                type:&#x27;select&#x27;,                 targetDivId: &#x27;&#x27;,                labels:xrange,                x:cb_obj[&#x27;x&#x27;],                y:cb_obj[&#x27;y&#x27;]            });            \"},\"id\":\"7884\",\"type\":\"CustomJS\"},{\"attributes\":{\"data_source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"7842\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"name\":\"medals.bronze\",\"nonselection_glyph\":{\"id\":\"7843\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"7845\",\"type\":\"CDSView\"}},\"id\":\"7844\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7835\",\"type\":\"Stack\"}},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"expr\":{\"id\":\"7836\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7842\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"7825\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"7820\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"medals.bronze,medals.silver,medals.gold\",\"formatter\":{\"id\":\"7850\",\"type\":\"BasicTickFormatter\"},\"minor_tick_line_color\":{\"value\":null},\"plot\":{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7816\",\"type\":\"BasicTicker\"}},\"id\":\"7815\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7821\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"7824\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"}},\"id\":\"7858\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"factors\":[\"Australia\",\"Austria\",\"Belarus\",\"Canada\",\"China\",\"Croatia\",\"Czech Republic\",\"Finland\",\"France\",\"Germany\",\"Great Britain\",\"Italy\",\"Japan\",\"Kazakhstan\",\"Korea\",\"Latvia\",\"Netherlands\",\"Norway\",\"Poland\",\"Russian Fed.\",\"Slovakia\",\"Slovenia\",\"Sweden\",\"Switzerland\",\"Ukraine\",\"United States\"],\"range_padding\":0.1},\"id\":\"7803\",\"type\":\"FactorRange\"},{\"attributes\":{\"callback\":null,\"start\":0},\"id\":\"7805\",\"type\":\"DataRange1d\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7816\",\"type\":\"BasicTicker\"}},\"id\":\"7819\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"7864\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"7897\",\"type\":\"ToolbarBox\"},{\"id\":\"7895\",\"type\":\"Column\"}]},\"id\":\"7898\",\"type\":\"Column\"},{\"attributes\":{\"toolbar\":{\"id\":\"7896\",\"type\":\"ProxyToolbar\"},\"toolbar_location\":\"above\"},\"id\":\"7897\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"fields\":[\"medals.bronze\"]},\"id\":\"7836\",\"type\":\"Stack\"},{\"attributes\":{\"overlay\":{\"id\":\"7828\",\"type\":\"BoxAnnotation\"}},\"id\":\"7822\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"tools\":[{\"id\":\"7820\",\"type\":\"PanTool\"},{\"id\":\"7821\",\"type\":\"WheelZoomTool\"},{\"id\":\"7822\",\"type\":\"BoxZoomTool\"},{\"id\":\"7823\",\"type\":\"SaveTool\"},{\"id\":\"7824\",\"type\":\"ResetTool\"},{\"id\":\"7825\",\"type\":\"HelpTool\"},{\"id\":\"7882\",\"type\":\"HoverTool\"}]},\"id\":\"7896\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"items\":[{\"id\":\"7853\",\"type\":\"LegendItem\"},{\"id\":\"7867\",\"type\":\"LegendItem\"},{\"id\":\"7881\",\"type\":\"LegendItem\"}],\"location\":\"top_left\",\"plot\":{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"7852\",\"type\":\"Legend\"},{\"attributes\":{\"below\":[{\"id\":\"7811\",\"type\":\"CategoricalAxis\"}],\"js_event_callbacks\":{\"tap\":[{\"id\":\"7884\",\"type\":\"CustomJS\"}]},\"left\":[{\"id\":\"7815\",\"type\":\"LinearAxis\"}],\"outline_line_color\":{\"value\":null},\"plot_height\":502,\"plot_width\":701,\"renderers\":[{\"id\":\"7811\",\"type\":\"CategoricalAxis\"},{\"id\":\"7814\",\"type\":\"Grid\"},{\"id\":\"7815\",\"type\":\"LinearAxis\"},{\"id\":\"7819\",\"type\":\"Grid\"},{\"id\":\"7828\",\"type\":\"BoxAnnotation\"},{\"id\":\"7852\",\"type\":\"Legend\"},{\"id\":\"7844\",\"type\":\"GlyphRenderer\"},{\"id\":\"7857\",\"type\":\"GlyphRenderer\"},{\"id\":\"7871\",\"type\":\"GlyphRenderer\"}],\"title\":null,\"toolbar\":{\"id\":\"7826\",\"type\":\"Toolbar\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"7803\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"7807\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"7805\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"7809\",\"type\":\"LinearScale\"}},\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"label\":{\"value\":\"medals.silver\"},\"renderers\":[{\"id\":\"7857\",\"type\":\"GlyphRenderer\"}]},\"id\":\"7867\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"7816\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"7848\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"callback\":null,\"data\":{\"medals.bronze\":[1,1,1,4,1,0,2,0,5,4,1,4,2,1,1,2,8,7,0,7,0,4,2,1,1,10],\"medals.gold\":[0,2,5,4,3,0,1,0,3,8,1,0,1,0,2,0,6,8,4,6,1,2,2,6,0,6],\"medals.silver\":[2,6,0,8,2,1,3,3,2,3,0,2,4,0,1,1,6,4,0,8,0,1,5,3,0,4],\"pd_stacked_col\":[\"Australia\",\"Austria\",\"Belarus\",\"Canada\",\"China\",\"Croatia\",\"Czech Republic\",\"Finland\",\"France\",\"Germany\",\"Great Britain\",\"Italy\",\"Japan\",\"Kazakhstan\",\"Korea\",\"Latvia\",\"Netherlands\",\"Norway\",\"Poland\",\"Russian Fed.\",\"Slovakia\",\"Slovenia\",\"Sweden\",\"Switzerland\",\"Ukraine\",\"United States\"]},\"selected\":{\"id\":\"7865\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"7864\",\"type\":\"UnionRenderers\"}},\"id\":\"7800\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"bottom\":{\"expr\":{\"id\":\"7837\",\"type\":\"Stack\"}},\"fill_color\":{\"value\":\"#ff7f0e\"},\"line_color\":{\"value\":\"#ff7f0e\"},\"top\":{\"expr\":{\"id\":\"7838\",\"type\":\"Stack\"}},\"width\":{\"value\":0.9},\"x\":{\"field\":\"pd_stacked_col\"}},\"id\":\"7855\",\"type\":\"VBar\"},{\"attributes\":{\"children\":[{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"}]},\"id\":\"7894\",\"type\":\"Row\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"7828\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"children\":[{\"id\":\"7894\",\"type\":\"Row\"}]},\"id\":\"7895\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"7807\",\"type\":\"CategoricalScale\"},{\"attributes\":{\"source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"}},\"id\":\"7845\",\"type\":\"CDSView\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"7820\",\"type\":\"PanTool\"},{\"id\":\"7821\",\"type\":\"WheelZoomTool\"},{\"id\":\"7822\",\"type\":\"BoxZoomTool\"},{\"id\":\"7823\",\"type\":\"SaveTool\"},{\"id\":\"7824\",\"type\":\"ResetTool\"},{\"id\":\"7825\",\"type\":\"HelpTool\"},{\"id\":\"7882\",\"type\":\"HoverTool\"}]},\"id\":\"7826\",\"type\":\"Toolbar\"},{\"attributes\":{\"grid_line_color\":{\"value\":null},\"plot\":{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7812\",\"type\":\"CategoricalTicker\"}},\"id\":\"7814\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"7809\",\"type\":\"LinearScale\"},{\"attributes\":{\"label\":{\"value\":\"medals.gold\"},\"renderers\":[{\"id\":\"7871\",\"type\":\"GlyphRenderer\"}]},\"id\":\"7881\",\"type\":\"LegendItem\"},{\"attributes\":{\"source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"}},\"id\":\"7872\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"7800\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"7869\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"name\":\"medals.gold\",\"nonselection_glyph\":{\"id\":\"7870\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"7872\",\"type\":\"CDSView\"}},\"id\":\"7871\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"7865\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"medals.bronze\"},\"renderers\":[{\"id\":\"7844\",\"type\":\"GlyphRenderer\"}]},\"id\":\"7853\",\"type\":\"LegendItem\"},{\"attributes\":{\"fields\":[\"medals.bronze\",\"medals.silver\"]},\"id\":\"7839\",\"type\":\"Stack\"},{\"attributes\":{},\"id\":\"7823\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis_label\":\"name\",\"formatter\":{\"id\":\"7848\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":1,\"minor_tick_line_color\":{\"value\":null},\"plot\":{\"id\":\"7801\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7812\",\"type\":\"CategoricalTicker\"}},\"id\":\"7811\",\"type\":\"CategoricalAxis\"}],\"root_ids\":[\"7898\"]},\"title\":\"Bokeh Application\",\"version\":\"1.0.1\"}}';\n",
       "          var render_items = [{\"docid\":\"608a1a97-46af-4d9d-8153-403bb8d1ce5b\",\"roots\":{\"7898\":\"c784efd8-605d-4fb6-8a88-cb0d3f380342\"}}];\n",
       "          root.Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        \n",
       "          }\n",
       "          if (root.Bokeh !== undefined) {\n",
       "            embed_document(root);\n",
       "          } else {\n",
       "            var attempts = 0;\n",
       "            var timer = setInterval(function(root) {\n",
       "              if (root.Bokeh !== undefined) {\n",
       "                embed_document(root);\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "              attempts++;\n",
       "              if (attempts > 100) {\n",
       "                console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "                clearInterval(timer);\n",
       "              }\n",
       "            }, 10, root)\n",
       "          }\n",
       "        })(window);\n",
       "      });\n",
       "    };\n",
       "    if (document.readyState != \"loading\") fn();\n",
       "    else document.addEventListener(\"DOMContentLoaded\", fn);\n",
       "  })();\n",
       "<\\/script>`\n",
       "                                var chartscript = el.childNodes[1]\n",
       "                                var s = document.createElement(\"script\")\n",
       "                                s.innerHTML = chartscript.innerHTML\n",
       "                                d.parentNode.insertBefore(s, d)\n",
       "                            }\n",
       "                        }\n",
       "                    }\n",
       "                    if (!window.Bokeh && !window.autoload){\n",
       "                        window.autoload=true;\n",
       "                        \n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = 1;\n",
       "\n",
       "  if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  \n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    }\n",
       "    finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        root._bokeh_is_loading--;\n",
       "        if (root._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-1.0.1.min.js\"];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-1.0.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i].call(root, root.Bokeh);\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));\n",
       "                    }\n",
       "                    setChartScript()\n",
       "                    </script>\n",
       "                    <div style=\"padding:5px\" id=\"pd-bkchartdiv-8c0c4ba5\">\n",
       "<div class=\"bk-root\" id=\"c784efd8-605d-4fb6-8a88-cb0d3f380342\"></div></div>\n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Bar Chart Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsize8c0c4ba5\">96</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsize8c0c4ba5\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=96\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Cluster By:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectclusterby8c0c4ba5\" name=\"clusterby\" r=\"t\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"None\" >None</option>\n",
       "                        \n",
       "                            <option value=\"abbr\" >abbr</option>\n",
       "                        \n",
       "                            <option value=\"medals.total\" >medals.total</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtimeseries8c0c4ba5\" r=\"f\" type=\"checkbox\" name=\"timeseries\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtimeseries8c0c4ba5\">Time Series</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Type:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectcharttype8c0c4ba5\" name=\"charttype\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"grouped\" selected>grouped</option>\n",
       "                        \n",
       "                            <option value=\"stacked\" selected>stacked</option>\n",
       "                        \n",
       "                            <option value=\"subplots\" >subplots</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlegend8c0c4ba5\" r=\"f\" type=\"checkbox\" name=\"legend\"\n",
       "                                checked>\n",
       "                    <label for=\"optioncheckedlegend8c0c4ba5\">Show legend</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Sort By:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectsortby8c0c4ba5\" name=\"sortby\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"Keys ASC\" selected>Keys ASC</option>\n",
       "                        \n",
       "                            <option value=\"Keys DESC\" >Keys DESC</option>\n",
       "                        \n",
       "                            <option value=\"Values ASC\" >Values ASC</option>\n",
       "                        \n",
       "                            <option value=\"Values DESC\" >Values DESC</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=8c0c4ba5]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure8c0c4ba5\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML8c0c4ba5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution8c0c4ba5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution8c0c4ba5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution8c0c4ba5\").length > 0 ){\n",
       "                    $(\"#execution8c0c4ba5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone8c0c4ba5 != \"undefined\"){\n",
       "                    onDisplayDone8c0c4ba5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='barChart',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.bronze,medals.silver,medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='8c0c4ba5',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS8c0c4ba5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=8c0c4ba5]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure8c0c4ba5\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML8c0c4ba5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution8c0c4ba5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution8c0c4ba5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution8c0c4ba5\").length > 0 ){\n",
       "                    $(\"#execution8c0c4ba5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone8c0c4ba5 != \"undefined\"){\n",
       "                    onDisplayDone8c0c4ba5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='barChart',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.bronze,medals.silver,medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='8c0c4ba5',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS8c0c4ba5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=8c0c4ba5]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"8c0c4ba5]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigure8c0c4ba5');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML8c0c4ba5');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"8a2e83d6eb8546df875cc18864d4c964\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution8c0c4ba5\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution8c0c4ba5\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution8c0c4ba5\").length > 0 ){\n",
       "                    $(\"#execution8c0c4ba5\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone8c0c4ba5 != \"undefined\"){\n",
       "                    onDisplayDone8c0c4ba5();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='barChart',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.bronze,medals.silver,medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='8c0c4ba5',color='abbr')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS8c0c4ba5').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"8c0c4ba5]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df,cell_id='8a2e83d6eb8546df875cc18864d4c964',nostore_pixiedust='true',aggregation='SUM',binsize='10',chartsize='96',charttype='stacked',handlerId='barChart',keyFields='name',lineChartType='subplots',rendererId='bokeh',rowCount='100',showLegend='true',valueFields='medals.bronze,medals.silver,medals.gold',nostore_vh='1014',org_params='gen_tests,nostore_pixiedust',nostore_bokeh='true',prefix='8c0c4ba5',color='abbr')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "#GoogleReader has stopped working properly, disabling for now\n",
    "#SKIP_COMPARE_OUTPUT\n",
    "import pixiedust\n",
    "import pandas as pd\n",
    "from pandas_datareader import data as web\n",
    "import datetime\n",
    "\n",
    "start = datetime.date(2015,1,1)\n",
    "end = datetime.date.today()\n",
    "\n",
    "ibm = web.DataReader('IBM','google',start,end)\n",
    "apple = web.DataReader('AAPL', 'google', start, end)\n",
    "microsoft = web.DataReader('MSFT','google',start,end)\n",
    "\n",
    "stocks = pd.DataFrame({\"IBM\": ibm['Close'],\\\n",
    "                      \"AAPL\": apple['Close'],\\\n",
    "                      \"MSFT\": microsoft['Close']})\n",
    "stocks.reset_index(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pixiedust": {
     "displayParams": {
      "aggregation": "AVG",
      "charttype": "subplots",
      "handlerId": "lineChart",
      "keyFields": "Date",
      "rowCount": "100",
      "valueFields": "AAPL,IBM,MSFT"
     }
    }
   },
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "#SKIP_COMPARE_OUTPUT\n",
    "display(stocks, no_gen_tests='true', dateFormat='%m/%d')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "display(stocks, dateFormat='%m/%d',cell_id='C30E350068A445F9821AA5DCB2278A35',rendererId='bokeh',handlerId='lineChart',keyFields='Date',valueFields='AAPL,IBM,MSFT',aggregation='AVG',rowCount='100',charttype='subplots',nostore_cw='1099',nostore_pixiedust='true',org_params='gen_tests,dateFormat',nostore_bokeh='true',prefix='cbd6265b')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "display(stocks, dateFormat='%m/%d',cell_id='C30E350068A445F9821AA5DCB2278A35',rendererId='bokeh',handlerId='lineChart',keyFields='Date',valueFields='AAPL,IBM,MSFT',aggregation='AVG',rowCount='100',charttype='subplots',nostore_cw='1099',nostore_pixiedust='true',org_params='gen_tests,dateFormat',nostore_bokeh='true',prefix='540af31c')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "display(stocks, dateFormat='%m/%d',cell_id='C30E350068A445F9821AA5DCB2278A35',rendererId='bokeh',handlerId='barChart',keyFields='Date',valueFields='AAPL,IBM,MSFT',aggregation='AVG',rowCount='100',charttype='subplots',nostore_cw='1099',nostore_pixiedust='true',org_params='gen_tests,dateFormat',nostore_bokeh='true',prefix='13dfaad0')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=NO_RUN\n",
    "display(stocks, dateFormat='%m/%d',cell_id='C30E350068A445F9821AA5DCB2278A35',rendererId='bokeh',handlerId='barChart',keyFields='Date',valueFields='AAPL,IBM,MSFT',aggregation='AVG',rowCount='100',nostore_cw='1099',nostore_pixiedust='true',org_params='gen_tests,dateFormat',nostore_bokeh='true',prefix='1e1e8556')"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python (Spark 2.2.1)",
   "language": "python",
   "name": "py-spark221"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
